SUMMARY

  1. A deadlocked state occurs when two or more processes are waiting indefinitely for an event that can be caused by only one of the waiting processes.
  2. Three methods for dealing with the deadlock
    1. Use some protocol to prevent or avoid deadlock, ensuring that the system never enters deadlocked state
    2. Allow the system to enter a deadlocked state, detect it and then recover
    3. Ignore the problems altogether and pretend that deadlocks never occur in the system
  3. The third one is the most used
  4. The four necessary conditions for deadlock are mutual exclusion, hold and wait, no preemption, circular wait
  5. To prevent deadlock ensure that atleast one of the necessary conditions never holds
  6. To avoid deadlock, the OS must have the prior information of how each process will utilize system resources.
  7. A deadlock detection algorithm must be invoked to determine whether deadlock has occurred
  8. If a deadlock is detected, the system must recover either by terminating some of the deadlocked process or by preempting resources from some of the deadlocked processes
  9. Where preemption is used to deal with deadlocks, three issues must be addressed: selecting a victim, rollback, starvation

 

Deadlock by v.vanthana, Asst professor, Mca dept